<?php $this->import('Header') ?>
<div class="well"><!--查询结果开始-->
    <?php if (!empty($info)) { ?>
        <span>共<?php echo $pager->count; ?>条留言</span>
        <table class="table">
            <tr>
                <td>留言编号</td>
                <td>用户姓名</td>
                <td width="200px">留言内容</td>
                <td>用户手机号</td>
                <td>留言时间</td>
                <td>操作</td>
            </tr>
            <?php foreach ($info as $key => $val) { ?>
                <tr>
                    <td><?php echo $val['Id'] ?></td>
                    <td><?php echo $val['Name']?> </td>
                    <td title="<?php echo htmlspecialchars($val['Content'])?>"><?php echo htmlspecialchars(\Util\Comm::instance()->truncate($val['Content'], 20)) ?></td>
                    <td><?php echo date("Y-m-d H:i:s",$val['CreateTime'])?></td>
                    <td><?php echo $val['PhoneNum'] ?></td>
                    <td><a href="/Message/showMessage?id=<?php echo $val['Id'] ?>">查看详情</a></td>
                </tr>
            <?php } ?>

        </table>

        <?php if (isset($pager)) {
            \Controller\UC\Pager::instance()->run(array('pager' => $pager));
        } ?>

    <?php } else { ?>

        <div style="text-align: center;">当前无留言</div>
    <?php } ?>
</div>
<?php $this->import('Footer') ?>
